using UnityEngine;
using System.Collections;

public class Ammo : MonoBehaviour {
	
	void Update () 
	{
		transform.Rotate(Vector3.up * 100 * Time.deltaTime);
	}
	
	void OnTriggerEnter(Collider other)
	{
		if(other.gameObject.tag == "Player1" || other.gameObject.tag == "Player2")
		{
			RangedGun.ammo += 30;
			SpawnAmmo.AmmoInScene--;
			Destroy(this.gameObject);
		}
	}
}